package com.qf.mapper;

import com.qf.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {

    @Select("select * from t_users")
    public List<User> findUserAll();

    @Insert("insert into t_users (name, password, sex, birthday, registTime) " +
            "values(#{name}, #{password}, #{sex}, #{birthday}, #{registTime})")
    public int insertUser(User user);
    @Update( " update t_users set name=#{name},password=#{password}" +
            ",sex=#{sex},birthday=#{birthday},registTime=#{registTime} where id=#{id}")
    public int UpdatetUser(User user);
    @Delete("delete from t_users where id=#{id}")
    int delectUser(int id);
}
